home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / TransSkel 3.24 / Documents / Tutorial / Examples / SimpleApp2.c < prev    next >
Text File  |  1996-01-17  |  675b  |  29 lines

  1. # include   "TransSkel.h"
  2.  
  3.  
  4. static pascal void
  5. DoFileMenu (short item)
  6. {
  7.     SkelStopEventLoop ();            /* tell SkelEventLoop() to quit */
  8. }
  9.  
  10.  
  11. int
  12. main (void)
  13. {
  14. MenuHandle    m;
  15.  
  16.     SkelInit (nil);                /* initialize */
  17.     SkelApple (nil, nil);        /* handle Apple menu */
  18.     /* create File menu, install handler */
  19.     m = NewMenu (skelAppleMenuID + 1, "\pFile");
  20.     AppendMenu (m, "\pQuit/Q");
  21.     (void) SkelMenu (m,                    /* menu handle */
  22.                         DoFileMenu,        /* item selection function */
  23.                         nil,            /* menu disposal function */
  24.                         false,            /* not a submenu */
  25.                         true);            /* draw menu bar */
  26.     SkelEventLoop ();            /* loop 'til Quit selected */
  27.     SkelCleanup ();                /* clean up */
  28. }
  29.